<?php
// +----------------------------------------------------------------------
//            -------------------------
//           /   / ----------------\  \
//          /   /             \  \
//         /   /              /  /
//        /   /    /-------------- /  /
//       /   /    /-------------------\  \
//      /   /                   \  \
//     /   /                     \  \
//    /   /                      /  /
//   /   /      /----------------------- /  /
//  /-----/      /---------------------------/
// +----------------------------------------------------------------------
// | Copyright (c) 2016 http://baimifan.cn All rights reserved.
// +----------------------------------------------------------------------
// | Author: 汪利东,2016-04-13 17:14
// +----------------------------------------------------------------------

namespace Admin\Model;
use Think\Model;

class OrderBookAppriseModel extends Model\RelationModel
{
    protected $_link = [
        'user' => [
            'mapping_type' => self::HAS_ONE,
            'foreign_key'  => 'user_id',
            'mapping_key'  => 'user_id',
        ],
        'book' => [
            'mapping_type' => self::HAS_ONE,
            'foreign_key'  => 'book_id',
            'mapping_key'  => 'book_id',
        ],
        'img'  => [
            'mapping_type' => self::HAS_ONE,
            'class_name' => 'order_appraise_img',
            'foreign_key'  => 'apprise_id',
            'mapping_key'  => 'apprise_id',
        ],
    ];
}